package com.xjtu.platform.user.student.consultRecord.dao;

import com.xjtu.platform.user.student.consultRecord.StudentConsultRecordDto;
import com.xjtu.platform.user.student.consultRecord.StudentConsultRecordModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentConsultRecordDao {

    @Select("select consult.visit_id,user.user_name,time.start_time,time.end_time,duty.place_name,duty.day,consult.count_num as count,consult.state from user,duty,consult,time,first_visit where first_visit.student_id=#{user_id} and first_visit.visiter_id=user.user_id and consult.duty_id=duty.duty_id and first_visit.visit_id=consult.visit_id and duty.time_id=time.time_id")
    List<StudentConsultRecordModel> getRecordInfo(StudentConsultRecordDto studentConsultRecordDto);
}
